package com.lagou.homework123;

/**
 * 用户消费信息类
 * 特征：统计通话时长、统计上网流量、每月消费金额
 */
public class ConsumeInfo {

//    private int totalTalkTime = 0;
//    private int totalCellularData = 0;
//    private int totalMonthExpense = 0;


    private int talkTime = 0;
    private int cellularData = 0;
    private int monthExpense = 0;

//    public ConsumeInfo(int talkTime, int cellularData, int monthExpense) {
//        setTalkTime(talkTime);
//        setCellularData(cellularData);
//        setMonthExpense(monthExpense);
//    }

    public void show() {
        System.out.println("累计通话时长：" + getTalkTime() + "分钟，累计上网流量：" + getCellularData() + "MB" + "，本月累计消费金额：" + getMonthExpense() + "元");
        System.out.println("---------------------------------------------");
    }

//    @Override
//    public void call(int talkTime, SimCard simCard) {
//        simCard.setTalkTime(simCard.getTalkTime() - talkTime);
//        System.out.println("本次通话时长：" + talkTime + "分钟，剩余通话时长：" + simCard.getTalkTime());
//    }
//
//    @Override
//    public void surfInternet(int cellularData, SimCard simCard) {
//        simCard.setCellularData(simCard.getCellularData() - cellularData);
//        System.out.println("本次使用上网流量：" + cellularData + "MB，剩余上网流量：" + simCard.getCellularData());
//    }


    public int getTalkTime() {
        return talkTime;
    }

    public void setTalkTime(int talkTime) {
        this.talkTime += talkTime;
    }

    public int getCellularData() {
        return cellularData;
    }

    public void setCellularData(int cellularData) {
        this.cellularData += cellularData;
    }

    public int getMonthExpense() {
        return monthExpense;
    }

    public void setMonthExpense(int monthExpense) {
        this.monthExpense += monthExpense;
    }
}
